package com.hackaton.touringengine.entity;

import java.util.List;

import javax.jdo.annotations.Order;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
import javax.jdo.annotations.Extension;

import com.google.appengine.api.datastore.Key;


@PersistenceCapable
public class User {
    @PrimaryKey
    private Key key;
    
    @Persistent
    private String name;

    @Persistent(mappedBy = "user")
    @Order(extensions = @Extension(vendorName="datanucleus", key="list-ordering", value="date desc"))
    private List<Location> locations;
    
	public Key getKey() {
		return key;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setKey(Key key) {
		this.key = key;
	}

	public List<Location> getLocations() {
		return locations;
	}

	public void setLocations(List<Location> locations) {
		this.locations = locations;
	}
}
